<template>
    <div>

        <el-menu style="width: 200px;min-height: calc( 100vh - 50px)"
                 :default-active="path" router
                 class="el-menu-vertical-demo">
            <el-sub-menu index="1"  >
                <template #title>
                    <i class="el-icon-location"></i>
                    <h3>创作中心</h3>
                </template>
<!--                <el-menu-item index="/user" style="border-bottom: #ccc 1px solid">用户管理</el-menu-item>-->
                <el-menu-item index="/data"  style="border-bottom: #ccc 1px solid">数据查询</el-menu-item>
                <el-menu-item index="/chapter" style="border-bottom: #ccc 1px solid">章节管理</el-menu-item>
                <el-menu-item index="/write"  style="border-bottom: #ccc 1px solid">疯狂写作</el-menu-item>
                <el-menu-item index="/book"  style="border-bottom: #ccc 1px solid">书籍管理</el-menu-item>
<!--                <el-menu-item index="/comment"  style="border-bottom: #ccc 1px solid">查看评论</el-menu-item>-->
                <el-menu-item index="/message"  style="border-bottom: #ccc 1px solid">用户留言</el-menu-item>
            </el-sub-menu>

        </el-menu>
    </div>
</template>

<script>
    import request from "../utils/request";

    export default {
        name: "Aside",
        data() {
            return {
                user: {},
                path: this.$route.path
            }
        },
        created() {
            // let userStr = sessionStorage.getItem("user") || "{}"
            // this.user = JSON.parse(userStr)
            //
            // request.post("/user/getUserById" , this.user.id).then(res =>{
            //     console.log(1111111111)
            //     console.log(res)
            //     if (res.code === '0'){
            //         this.user = res.data
            //     }
            // })


        }
    }
</script>
